#include <iostream>
using namespace std;

int main() {
	int n;
	cin >> n;
	int num=n;
	n=n*2+1;
	int a[n][n], top = 0, bottom = n - 1, left = 0, right = n - 1;

	while (num >= 0) {
		for (int i = left; i <= right; ++i) {
			a[top][i] = num;
		}
		top++;

		for (int i = top; i <= bottom; ++i) {
			a[i][right] = num;
		}
		right--;

		for (int i = right; i >= left; --i) {
			a[bottom][i] = num;
		}
		bottom--;

		for (int i = bottom; i >= top; --i) {
			a[i][left] = num;
		}
		left++;
		
		num--;
	}

	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			cout<< " " <<a[i][j] ;
		}
		cout << endl;
	}
	return 0;
}
//
/* 
	int a;
	cin>>a;
	int N=a*2+1;
	int n[N];
	for(int i=0; i<N; i++) {
		for(int j=i; j<N-i; j++)
			n[j]=a;
		for(int j=N-i; j<=i; j++)
			n[j]=-a;
		for (int j = 0; j < N; j++)
			cout << n[j] << " ";
		cout << endl;
		--a;
	}
}
*/

